layui.use(['form', 'layedit', 'laydate'], function(){
    var form = layui.form
        ,layer = layui.layer
        ,layedit = layui.layedit
        ,laydate = layui.laydate;




    $("#beOnDuty").on("click",function (){
        let url="/logisticsGate/beOnDuty";
        $.get(url, null,function (map){
            console.info(map);
            if (map.state==1){
                layer.msg(map.message)
            }else if (map.state ==0) {
                layer.msg(map.message)
            }else {
                layer.msg("出勤打卡失败")
            }
        })
    })




    $("#offDuty").on("click",function (){
        let url="/logisticsGate/offDuty";
        $.get(url,null,function (map){
            if (map.state==0){
                layer.msg(map.message);
            }else {
                layer.msg("下班打卡失败")
            }

        } )
    })
})

